<!DOCTYPE HTML>
<html class="help-html">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>编辑就诊人</title>
    <link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
    <link href="css/choose.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
    <link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body class="help-body">
<div class="site-name">
  <p>北京114预约挂号平台</p>
</div>

<div class="add-container">
  <div class="add-wrapper">
    <div class="add-title">
      <h4>就诊人信息</h4>
    </div>

    <div class="add-list">
      <div class="add-item">
        <div class="add-left">
          <p>*就诊人姓名</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="patientName" placeholder="请输入就诊人姓名" />
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*证件类型</p>
        </div>
        <div class="add-right">
          <div class="add-input sele-bp-1">
            <input id="patientIdtype" placeholder="点击选择证件类型"/>
          </div>
          <div class="display-none">
            <div vid="居民身份证(包含现役军人、人民武装警察)">居民身份证(包含现役军人、人民武装警察)</div>
            <div vid="港澳居民来往内地通行证">港澳居民来往内地通行证</div>
            <div vid="台湾居民来往大陆通行证">台湾居民来往大陆通行证</div>
            <div vid="护照">护照</div>
            <div vid="外国人永久居留身份证">外国人永久居留身份证</div>
            <div vid="港澳居民居住证">港澳居民居住证</div>
            <div vid="台湾居民居住证">台湾居民居住证</div>
          </div>
          <i class="aui-iconfont aui-icon-right"></i>
        </div>
      </div>


      <div class="add-item">
        <div class="add-left">
          <p>证件号码</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="patientIdnumber" placeholder="请输入证件号码" />
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>手机号</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="patientPhone" placeholder="请输入手机号" />
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*当前住址</p>
        </div>
        <div class="add-right"> e
          <div class="add-input">
            <!--<input placeholder="点击选择省市区" id="picker"/>-->
            <input placeholder="点击选择省市区" id="areaId"/>
          </div>
        </div>
      </div>


      <div class="add-item">
        <div class="add-left">
          <p>*详细地址</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="detailedAddress" placeholder="应公安机关要求，请填写真实住址" />
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>性别</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="sex" placeholder="应公安机关要求，请填写真实住址" />
          </div>
        </div>
      </div>

    </div>

    <div class="add-title">
      <h4>建档信息</h4>
    </div>

    <div class="add-list">

      <div class="add-item">
        <div class="add-left">
          <p>*民族</p>
        </div>
        <div class="add-right">
          <div class="add-input sele-bp-2">
            <input id="nation" placeholder="点击选择民族"/>
          </div>
          <div class="display-none">
            <div vid="汉族">汉族</div>
            <div vid="蒙古族">蒙古族</div>
            <div vid="回族">回族</div>
            <div vid="藏族">藏族</div>
            <div vid="维吾尔族">维吾尔族</div>
            <div vid="苗族">苗族</div>
            <div vid="彝族">彝族</div>
            <div vid="壮族">壮族</div>
          </div>
          <i class="aui-iconfont aui-icon-right"></i>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*专程来京就医</p>
        </div>
        <div class="add-right">
          <div class="add-input" id="maritalStatus">
            <input class="radio_type" type="radio" name="type1" checked="checked"/>
            <label>未婚</label>
            <input class="radio_type" type="radio" name="type1" />
            <label>已婚</label>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*户口所在地</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <!--<input placeholder="点击选择省市区" id="picker2"/>-->
            <input placeholder="点击选择省市区" id="hukou"/>
          </div>
        </div>
      </div>


      <div class="add-item">
        <div class="add-left">
          <p>*专程来京就医</p>
        </div>
        <div class="add-right">
          <div class="add-input" id="whethertoCometoBeijing">
            <input class="radio_type" type="radio" name="type2" checked="checked"/>
            <label>是</label>
            <input class="radio_type" type="radio" name="type2" />
            <label>否</label>
          </div>
        </div>
      </div>
    </div>

    <div class="add-title">
      <h4>联系人信息</h4>
    </div>

    <div class="add-list">
      <div class="add-item">
        <div class="add-left">
          <p>*联系人姓名</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="contactName" placeholder="请输入联系人姓名" />
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*联系人证件类型</p>
        </div>
        <div class="add-right">
          <div class="add-input sele-bp-3">
            <input id="contactIdtype" placeholder="点击选择联系人证件类型"/>
          </div>
          <div class="display-none">
            <div vid="居民身份证(包含现役军人、人民武装警察)">居民身份证(包含现役军人、人民武装警察)</div>
            <div vid="港澳居民来往内地通行证">港澳居民来往内地通行证</div>
            <div vid="台湾居民来往大陆通行证">台湾居民来往大陆通行证</div>
            <div vid="护照">护照</div>
            <div vid="外国人永久居留身份证">外国人永久居留身份证</div>
            <div vid="港澳居民居住证">港澳居民居住证</div>
            <div vid="台湾居民居住证">台湾居民居住证</div>
          </div>
          <i class="aui-iconfont aui-icon-right"></i>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*联系人证件号码</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="contactIdnumber" placeholder="请输入联系人证件号码" />
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*联系人手机号</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <input id="contactPhone" placeholder="请输入联系人手机号" />
          </div>
        </div>
      </div>

    </div>

    <div class="add-btn">
      <a id="updates" href="javascript:;">编辑就诊人</a>
    </div>

  </div>
</div>

</body>
<script src="js/jquery.min.js"></script>
<script src="js/swiper.min.js"></script>
<script src="js/hSdrop.js"></script>
<script src="js/url.js"></script>
<!--<script src="js/picker.min.js"></script>-->
<!--<script type="text/javascript" src="js/city.js"></script>-->
<!--<script type="text/javascript" src="js/add.js"></script>-->
<script type="text/javascript">
	new hSdrop({
		els:'.sele-bp-1'
	})

  new hSdrop({
		els:'.sele-bp-2'
	})

  new hSdrop({
		els:'.sele-bp-3'
	})


    var id = location.href.split("=")[1];

    setOrder(id);
    function  setOrder(id) {
      $.ajax({
        type:"post",
        url:getUrl()+"wechat114/patient/selectBy",
        data:{"patientId":id},
        dataType:"json",
        success:function (data) {
          var msg = data.data;
          $("#patientName").val(msg.patientName);
          $("#patientIdtype").val(msg.patientIdtype);
          $("#patientIdnumber").val(msg.patientIdnumber);
          $("#sex").val(msg.sex);
          $("#nation").val(msg.nation);
          $("#birthday").val(msg.birthday);
          $("#patientPhone").val(msg.patientPhone);
          $("#areaId").val(msg.areaId);
          $("#detailedAddress").val(msg.detailedAddress);
          $("#whethertoCometobeijing").val(msg.whethertoCometobeijing);
          $("#contactName").val(msg.contactName);
          $("#contactIdnumber").val(msg.contactIdnumber);
          $("#contactPhone").val(msg.contactPhone);
          $("#hukou").val(msg.hukou);
          $("#maritalStatus").val(msg.maritalStatus);
        }
      })
    }

    $("#updates").click(function() {
      $.ajax({
        Type: "post",
        url: getUrl()+"wechat114/patient/update",
        data: {
          "patientId":id,
         "patientName": $("#patientName").val(),

          "patientIdtype":$("#patientIdtype").val(),

        " patientIdnumber":$("#patientIdnumber").val(),

      "nation":$("#nation").val(),

      "patientPhone":$("#patientPhone").val(),
      "areaId":$("#areaId").val(),
      "detailedAddress":$("#detailedAddress").val(),
      "maritalStatus":$("#maritalStatus").val(),
      "whethertoCometobeijing":$("#whethertoCometobeijing").val(),
      "contactName":$("#contactName").val(),
      "contactIdtype":$("#contactIdtype").val(),
      "contactIdnumber":$("#contactIdnumber").val(),
      "contactPhone":$("#contactPhone").val(),
      "hukou":$("#hukou").val(),
          "sex":$("#sex").val()

        },
        dataType: "json",
        success: function (data) {
          window.location.replace(getUrl() + "user.html");
        }
      })
    })

</script>
</html>
